package com.rx.service;

import java.util.List;

import com.rx.dao.RoleDaoI;
import com.rx.dao.RoleDaoImpl;
import com.rx.entity.Role;

public class RoleServiceImpl implements RoleServiceI<Role> {
	private static RoleDaoI rdi=new RoleDaoImpl();
	
	@Override
	public boolean add(Role t) throws Exception {
		return rdi.insert(t);
	}

	@Override
	public boolean modify(Role t) throws Exception {
		
		return rdi.update(t);
	}

	@Override
	public boolean remove(int id) throws Exception {
		return rdi.delete(id);
	}

	@Override
	public List<Role> getAll() throws Exception {
		return rdi.selectAll();
	}

	@Override
	public List<Role> GetIdRole(int id) throws Exception {
		return rdi.selectWhere(" and id="+id );
	}

	
}
